﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace chad.azure.diagnostics.data
{

    public class ReportConfiguration
    {
        public String ReportName { get; set; }
        public String ReportDescription { get; set; }

        public String ReportFileName { get; set; }

        public int DateTimeStartMinutesOffset { get; set; }
        public int DateTimeEndMinutesOffset { get; set; }

        public IList<ReportDataset> ReportDatasets { get; set; }

        public IList<ReportPage> ReportPages { get; set; }

        public ReportOutput ReportOutput;
    }


    public enum ReportPageType
    {
        EventDetail = 10,
        EventSummary = 12,
        Metric = 20
    }

    public class ReportDataset
    {
        public String DatasetName {get;set;}
        public String StorageAccountName { get; set; }
        public String StorageAccountKey { get; set; }

        public String DeploymentId { get; set; }
        public String RoleName { get; set; }

        public Dictionary<string, object> Parameters;
    }

    public class ReportPage
    {
        public ReportPageType PageType { get; set; }
        public String _PageType
        {
            get { return "EventDetail = 10,EventSummary = 12,Metric = 20"; }
            set { }
        }
        public String PageTitle { get; set; }
        public String SheetName { get; set; }
        public String DatasetName { get; set; }
        public Dictionary<String, object> Parameters;

    }

    public class ReportOutput
    {
        public String FileOutputPath { get; set; }

        public String SmtpServerName { get; set; }
        public int SmtpServerPort { get; set; }
        public String FromEmailAddess { get; set; }
        public String[] ToEmailAddresses { get; set; }
        public Boolean DeleteFileAfterSendingEmail { get; set; }
    }

}
